﻿@using Helper
@model CoreData.OrderService
@{ 
    ViewBag.Title = "Cập nhật đơn hàng";
}
<div class="row-fluid">
    <div class="span12">
        <div class="head">
            <div class="isw-documents">
            </div>
            <h1>
                Cập nhật đơn hàng</h1>
            <div class="clear">
            </div>
        </div>
        <div class="block-fluid tabs">
            @using (Ajax.BeginForm("AddOrUpdate", "OrderServiceManagement", new AjaxOptions { OnSuccess = "Success", HttpMethod = "Post" }, new { enctype = "multipart/form-data", @id = "validation" }))
            {
                <div class="warning-area">
                </div>
                @Html.HiddenFor(x => x.ID)
                <div class="row-form">
                    <div class="span2">
                        Mã đơn hàng</div>
                    <div class="span9">
                        # @Html.DisplayTextFor(x => x.ID)</div>
                    <div class="clear">
                    </div>
                </div>                
                <div class="row-form">
                    @if (Model.Type == (int)ValueDefine.OrderServiceType.hotel)
                    { 
                        <div class="span2">
                            Tên khách sạn</div>
                    }
                    else if (Model.Type == (int)ValueDefine.OrderServiceType.vehicle)
                    { 
                        <div class="span2">
                            Tên phương tiện</div>
                    }
                    <div class="span9">
                        @Html.HiddenFor(c => c.ReferenceID)
                        @Html.DisplayTextFor(x => x.ReferenceNameExt)</div>
                    <div class="clear">
                    </div>
                </div>
                <div class="row-form">
                    <div class="span2">
                        Khách hàng</div>
                    <div class="span9">
                        @Html.DisplayTextFor(x => x.Name)</div>
                    <div class="clear">
                    </div>
                </div>
                <div class="row-form">
                    <div class="span2">
                        Địa chỉ</div>
                    <div class="span9">
                        @Html.HiddenFor(x => x.Address)
                        @Html.DisplayTextFor(x => x.Address)</div>
                    <div class="clear">
                    </div>
                </div>
                <div class="row-form">
                    <div class="span2">
                        Điện thoại</div>
                    <div class="span9">
                        @Html.HiddenFor(x => x.Phone)
                        @Html.DisplayTextFor(x => x.Phone)</div>
                    <div class="clear">
                    </div>
                </div>
                <div class="row-form">
                    <div class="span2">
                        Email</div>
                    <div class="span9">
                        @Html.HiddenFor(x => x.Email)
                        @Html.DisplayTextFor(x => x.Email)</div>
                    <div class="clear">
                    </div>
                </div>
                <div class="row-form">
                    <div class="span2">
                        Ngày đặt</div>
                    <div class="span9">
                        @Html.HiddenFor(c => c.CreateDate)
                        @Html.DisplayTextFor(x => x.CreateDate)</div>
                    <div class="clear">
                    </div>
                </div>
                <div class="row-form">
                    <div class="span2">
                        Ghi chú</div>
                    <div class="span9">
                        @Html.TextAreaFor(x => x.Info)
                    </div>
                    <div class="clear">
                    </div>
                </div>
                <div class="row-form">
                    <div class="span2">
                        Tình trạng đơn hàng :</div>
                    <div class="span9">
                        @Html.DropDownListFor(x => x.Status, Model.ListStatusExt, new { @class = "validate[required]" })
                    </div>
                    <div class="clear">
                    </div>
                </div>
                    if (Helper.SessionManagement.Value("pvalue").Contains("U") || Helper.SessionManagement.Value("pvalue").Contains("C"))
                    {
                <div class="row-form">
                    <div class="span2">
                    </div>
                    <div class="span9">
                        <input type="submit" class="btn btn-info span3" value="Cập nhật" /></div>
                    <div class="clear">
                    </div>
                </div>
                    }
            }
        </div>
    </div>
</div>
